package com.nan.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nan.model.Student;
import com.nan.model.Teacher;
import com.nan.service.StudentService;
import com.nan.mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 学生服务实现类
 */
@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student>
implements StudentService {

    @Autowired
    private StudentMapper studentMapper;

    @Override
    public List<Teacher> getTeachersByStudentId(Long studentId) {
        return baseMapper.getTeachersByStudentId(studentId);
    }

    @Override
    public List<Integer> queryGroupByClassId(Long id) {
        return studentMapper.selectGrouptByClassId(id);
    }

    @Override
    public List<Student> getStudentByClassIdAndGroup(Long classId, Integer group) {
        return studentMapper.getStudentByClassIdAndGroup(classId, group);
    }
}




